/**
 * 
 */
package acmCoder.xiaomi;

import java.util.Scanner;

/**
 * @author zhongfang
 *
 */
public class 路径规划 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int n = scanner.nextInt();
			int a = 0;
			int b = 1;
			int c = 0;
			for (int i = 0; i < n; i++) {
				c = a + b;
				a = b;
				b = c;
			}
			System.out.println(b);
		}
	}
}
